package ACWing.TheNnderlyingAlgorithm.高精度;
//793. 高精度乘法  (分治法)

import java.util.ArrayList;
import java.util.Scanner;

/**
 * @author :chenjie
 * @date :Created 2022/11/25 19:30
 */
public class HighPrecisionMultiplication {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String n=sc.next();
        int m=sc.nextInt();
        if(m==0||n=="0"){//特殊情况
            System.out.println(0);
            return;
        }
        char[] char1 = n.toCharArray();
        int[]arr=new int[n.length()];
        for (int i = n.length()-1,j=0; i >=0; i--,j++) {
            arr[i]=char1[j]-'0';
        }
        ArrayList<Integer> list=new ArrayList<>();
        int t=0;//表进位
        for (int i = 0; i < n.length(); i++) {
            int num=arr[i]*m;
            num=num+t;
            if(i==n.length()-1){
                list.add(num);
                break;
            }
            list.add(num%10);
            t=num/10;
        }
        for (int i = list.size()-1; i >=0 ; i--) {
            System.out.print(list.get(i));
        }


    }

}
